package com.douyin.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.time.LocalDateTime;

@Data
@TableName("users")
public class User {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField(value = "email")
    private String email;

    @TableField("password")
    private String password;

    @TableField(value = "nickname")
    private String nickname;

    @TableField("avatar")
    private String avatar;

    @TableField("bio")
    private String bio;

    @TableField("gender")
    private Integer gender; // 0-未知 1-男 2-女

    @TableField("birth_date")
    private LocalDateTime birthDate;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @TableField("last_login_at")
    private LocalDateTime lastLoginAt;

    @TableField(value = "status", fill = FieldFill.INSERT)
    private Integer status = 1; // 1-正常 0-禁用
}
